<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='用户管理-新增',jsPaths='/static/js/system/user/add.js')">
<div class="right" th:fragment="right">
    <!--面包屑-->
    <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                      <a href="/organization">系统管理</a>
                    <a href="/user/ui/list">用户管理</a>
                    <a><cite>新增</cite></a>
                </span>
    </div>

    <!--主体内容区-->
    <div class="form-content layui-container">
        <form class="layui-form" action="/user/save" method="post" id="myform">
            <div class="layui-form-item">
                <label class="layui-form-label must">姓名</label>
                <div class="layui-input-block">
                    <input type="text" name="userName" maxlength="20" lay-verify="required" placeholder="请输入姓名"
                           autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label must">手机号码</label>
                <div class="layui-input-block">
                    <input type="text" name="phone" maxlength="11" lay-verify="phone|required" placeholder="请输入手机号码"
                           autocomplete="off" class="layui-input">
                </div>
                <div style="font-size: 12px;color:#b2b2b2;margin-top:0;padding-left:115px;">手机号默认为登陆账号</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label must">密码</label>
                <div class="layui-input-block">
                    <input type="password" name="password" maxlength="16" lay-verify="password|required"
                           placeholder="请输入密码" autocomplete="new-password" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label must">角色</label>
                <div class="layui-input-block">
                    <select id="roleId" name="roleId" lay-filter="roleId" lay-verify="required" readonly="请选择角色">
                        <option></option>
                        <option th:each="role:${roles}" th:value="${role.id}" th:text="${role.name}"></option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">开关</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="status" lay-skin="switch" lay-text="启用|禁用" checked value="1">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn  layui-btn-normal" lay-submit lay-filter="submitBtn">保存</button>
                    <a href="/user/ui/list" class="layui-btn layui-btn-primary">返回</a>
                </div>
            </div>
        </form>

    </div>
</div>
</html>